﻿<!DOCTYPE html>
<html>

<head>
	<meta charset="UTF-8">
	<title>代理商管理</title>
	<link rel="stylesheet" href="/css/common2.css">
	<link rel="stylesheet" href="/css/urlty.css">

</head>

<body>
	<div id="vue-root" style="margin-top: 20px;">
		<div class="search_box" style="margin-top: 40px;"></div>
		<div>
			<div class="table">
				<table class="table_top">
					<thead>
						<tr>
							<th class="two">
								<input type="checkbox" class="check-box" v-model="all">
							</th>
							<th>序号</th>
							<th class="two">代理商</th>

							<th class="two">进入代理商</th>
							<th class="two">权限设置</th>
							<th class="three">编辑</th>
						</tr>
					</thead>
					<tbody id="list">
						<tr v-for="(agent,index) in list" :key="agent.id">
							<td class="two">
								<input type="checkbox" class="check-box" v-model="agent.checked">
							</td>
							<td><span v-text="index+1"></span></td>
							<td class="two" v-text="agent.name"></td>

							<td class="two"><button class="hut_but_tz" @click="enter(agent.id)">进入代理商</button></td>
							<td class="two">
								<a :href="'/authority_item.html?type=agent&id='+agent.id">
									<button class="hut_but_tz">代理商权限</button>
								</a>
							</td>
							<td class="three">
								<div class="option">
									<div class="edit-icon option-icon" @click="edit(agent.id)"
										style="position: absolute; left: 20%; top: 30%;">
										<img class="img" src="/image/edit.png" height="20" width="20"
											onmouseover="this.src='/image/edit_light.png'"
											onmouseout="this.src='/image/edit.png'" />
									</div>
								</div>
							</td>
						</tr>
					</tbody>
				</table>
			</div>
		</div>

		<ul class="pagination" v-if="pages>1">
			<li>
				<a v-if="pageNum!=1" @click="pageNum=1">«</a>
				<a class="pages-jump" v-if="pageNum!=1" @click="pageNum--">‹</a>
				<a v-text="pageNum"></a>
				<a class="pages-jump" v-if="pageNum!=pages" @click="pageNum++">›</a>
				<a v-if="pageNum!=pages" @click="pageNum=pages">»</a>
			</li>
		</ul>
	</div>

	<script src="/scriptZIP/qs.min.js"></script>
	<script src="/scriptZIP/vue.min.js"></script>
	<script src="/scriptZIP/axios.min.js"></script>

	<script src="/js/common.js"></script>
	<script src="/js/list.js"></script>

	<script>
		var app = new Vue(merge({
			data: {
				urls: {
					list: '/pc/agent/sub/' + top_params().id,
				}
			},
			methods: {
				enter: function (id) {
					open("/agent/agent_menu.html?id=" + id, '_blank');
				},
				edit: function (id) {
					location.href = "sub_agent_item.html?id=" + id;
				}
			},
		}));
	</script>


</body>

</html>